<extend name="Base/s1"/>
<block name="body">

<div class="main"><div class="main_center"><div class="center_left">
<!-- 左侧菜单 -->
	<include file="Public/leftmenu"/>
<!-- 左侧菜单 --></div><!-- 个人中心 初始状态 start -->
<div class="center_right" id="MemberCenterCtrl" style="display: block;">

	<div class="red" style="clear:both; overflow:hidden; padding:10px;">个人资料</div>

	<empty name='cut'>
	<div class="personal_info_none_goods">
				<p>没有登录，<a href='{:U("user/login")}' class="red">请先登录</a></p>
			
				<div class="cb"></div>
			</div>
	<else />
       
    <ul style="margin-left:40px;">
        
		
  	
		<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script><div class="controls">
						<label class="item-label" >上传图像</label>
						<input type="file" id="upload_picture" class="uploadify-button">
					
						<div class="upload-img-box">
						<notempty name="info['e']">
							<div class="upload-pre-item"><img src="{$info.face|get_cover='path'}"/></div>
						</notempty>
						</div>
					</div>
					<script type="text/javascript">
					//上传图片
				    /* 初始化上传插件 */
					$("#upload_picture").uploadify({
				        "height"          : 30,
				        "swf"             : "__STATIC__/uploadify/uploadify.swf",
				        "fileObjName"     : "download",
				        "buttonText"      : "上传图片",
				        "uploader"        : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
				        "width"           : 120,
				        'removeTimeout'	  : 1,
				        'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
				        "onUploadSuccess" : uploadPicture,
				        'onFallback' : function() {
				            alert('未检测到兼容版本的Flash.');
				        }
				    });
					function uploadPicture(file, data){
				    	var data = $.parseJSON(data);
				    	var src = '';
				        if(data.status){
				        	$("#icon").val(data.id);
				        	src = data.url || '__ROOT__' + data.path;
				        	$("#pic").val(src);
							$("#target-info").attr("src",src
				        	);

            
				        } else {
				        	updateAlert(data.info);
				        	setTimeout(function(){
				                $('#top-alert').find('button').click();
				                $(that).removeClass('disabled').prop('disabled',false);
				            },1500);
				        }
				    }
					</script>

	<div style="float:left;"><img src="__IMG__/pic_head_34_s.gif" width="300" height="300"/></div>
	
	<form method="post" class="person-info" name="form" action="{:U('center/update')}">
	 <input type="hidden" id="pic" name="pic" />
			<input type="hidden" name="face"  id="icon" value="{$info.face|default=''}"/>
		<input type="submit" class="btn-xiugai orange" value="保存">
	</form>

	
	</empty>
	
	

<!-- 个人中心 初始状态 end --></div></div></div>
    <script type="text/javascript">_init_area();</script>
       
   
</block>
